home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0159 / vb.zip / SECAPTIO.FRM < prev    next >
Text File  |  1995-12-30  |  12KB  |  387 lines

  1. VERSION 2.00
  2. Begin Form CaptionDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Caption Properties Demo"
  6.    ClientHeight    =   3300
  7.    ClientLeft      =   2535
  8.    ClientTop       =   2670
  9.    ClientWidth     =   7665
  10.    Height          =   3705
  11.    Left            =   2475
  12.    LinkTopic       =   "Form2"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   3300
  15.    ScaleWidth      =   7665
  16.    Top             =   2325
  17.    Width           =   7785
  18.    Begin SSFrame Frame3D1 
  19.       Caption         =   "CaptionColor"
  20.       Height          =   1095
  21.       Left            =   4860
  22.       TabIndex        =   8
  23.       Top             =   60
  24.       Width           =   2175
  25.       Begin Label Colors 
  26.          BackColor       =   &H00000000&
  27.          Height          =   240
  28.          Index           =   0
  29.          Left            =   540
  30.          TabIndex        =   9
  31.          Top             =   360
  32.          Width           =   240
  33.       End
  34.       Begin Label Colors 
  35.          BackColor       =   &H00808080&
  36.          Height          =   240
  37.          Index           =   1
  38.          Left            =   540
  39.          TabIndex        =   10
  40.          Top             =   630
  41.          Width           =   240
  42.       End
  43.       Begin Label Colors 
  44.          BackColor       =   &H00FFFFFF&
  45.          Height          =   240
  46.          Index           =   2
  47.          Left            =   780
  48.          TabIndex        =   11
  49.          Top             =   360
  50.          Width           =   240
  51.       End
  52.       Begin Label Colors 
  53.          BackColor       =   &H000000FF&
  54.          Height          =   240
  55.          Index           =   3
  56.          Left            =   780
  57.          TabIndex        =   14
  58.          Top             =   630
  59.          Width           =   240
  60.       End
  61.       Begin Label Colors 
  62.          BackColor       =   &H0000FF00&
  63.          Height          =   240
  64.          Index           =   4
  65.          Left            =   1020
  66.          TabIndex        =   15
  67.          Top             =   360
  68.          Width           =   240
  69.       End
  70.       Begin Label Colors 
  71.          BackColor       =   &H0000FFFF&
  72.          Height          =   240
  73.          Index           =   5
  74.          Left            =   1020
  75.          TabIndex        =   16
  76.          Top             =   630
  77.          Width           =   240
  78.       End
  79.       Begin Label Colors 
  80.          BackColor       =   &H00FF0000&
  81.          Height          =   240
  82.          Index           =   6
  83.          Left            =   1260
  84.          TabIndex        =   17
  85.          Top             =   360
  86.          Width           =   240
  87.       End
  88.       Begin Label Colors 
  89.          BackColor       =   &H00FF00FF&
  90.          Height          =   240
  91.          Index           =   7
  92.          Left            =   1260
  93.          TabIndex        =   18
  94.          Top             =   630
  95.          Width           =   240
  96.       End
  97.       Begin Label Colors 
  98.          BackColor       =   &H000080FF&
  99.          Height          =   240
  100.          Index           =   8
  101.          Left            =   1500
  102.          TabIndex        =   19
  103.          Top             =   360
  104.          Width           =   240
  105.       End
  106.       Begin Label Colors 
  107.          BackColor       =   &H00004040&
  108.          Height          =   240
  109.          Index           =   9
  110.          Left            =   1500
  111.          TabIndex        =   20
  112.          Top             =   630
  113.          Width           =   240
  114.       End
  115.    End
  116.    Begin HScrollBar HScroll1 
  117.       Height          =   225
  118.       Index           =   1
  119.       Left            =   4200
  120.       Max             =   140
  121.       Min             =   -140
  122.       TabIndex        =   23
  123.       Top             =   1860
  124.       Width           =   2865
  125.    End
  126.    Begin TextBox Text1 
  127.       Height          =   315
  128.       Left            =   4200
  129.       TabIndex        =   0
  130.       Text            =   " "
  131.       Top             =   2520
  132.       Width           =   2895
  133.    End
  134.    Begin HScrollBar HScroll1 
  135.       Height          =   225
  136.       Index           =   0
  137.       Left            =   4200
  138.       Max             =   140
  139.       Min             =   -140
  140.       TabIndex        =   5
  141.       Top             =   1590
  142.       Width           =   2865
  143.    End
  144.    Begin Frame Frame1 
  145.       BackColor       =   &H00C0C0C0&
  146.       Caption         =   "Caption ID"
  147.       Height          =   1095
  148.       Left            =   3450
  149.       TabIndex        =   1
  150.       Top             =   60
  151.       Width           =   1215
  152.       Begin OptionButton Option1 
  153.          BackColor       =   &H00C0C0C0&
  154.          Caption         =   "2"
  155.          Height          =   255
  156.          Index           =   2
  157.          Left            =   360
  158.          TabIndex        =   4
  159.          TabStop         =   0   'False
  160.          Top             =   720
  161.          Width           =   615
  162.       End
  163.       Begin OptionButton Option1 
  164.          BackColor       =   &H00C0C0C0&
  165.          Caption         =   "1"
  166.          Height          =   255
  167.          Index           =   1
  168.          Left            =   360
  169.          TabIndex        =   3
  170.          TabStop         =   0   'False
  171.          Top             =   480
  172.          Width           =   615
  173.       End
  174.       Begin OptionButton Option1 
  175.          BackColor       =   &H00C0C0C0&
  176.          Caption         =   "0"
  177.          Height          =   255
  178.          Index           =   0
  179.          Left            =   360
  180.          TabIndex        =   2
  181.          Top             =   240
  182.          Value           =   -1  'True
  183.          Width           =   615
  184.       End
  185.    End
  186.    Begin SELECTOR Selector1 
  187.       Angle           =   330
  188.       AutoAlign       =   -1  'True
  189.       AutoAngle       =   -1  'True
  190.       AutoAngleConfine=   0   'False
  191.       AutoOffset      =   -1  'True
  192.       AutoOffsetDistance=   0.6
  193.       AutoOffsetStyle =   1  ' 1 - Horizontal 
  194.       AutoRadius      =   0.6
  195.       AutoStartAngle  =   210
  196.       AutoStopAngle   =   330
  197.       AVersion        =   0
  198.       BackgroundColor =   &H00C0C0C0&
  199.       BevelInner      =   0  ' 0 - None
  200.       BevelOuter      =   2  ' 2 - Inset
  201.       BevelWidth      =   2
  202.       BorderType      =   1  ' 1 - Bevel
  203.       BorderWidth     =   2
  204.       FontID          =   0
  205.       FrameColor      =   &H00C0C0C0&
  206.       FrameScaleX     =   1.1
  207.       FrameScaleY     =   1.1
  208.       FrameStyle      =   0  ' 0 - None
  209.       Height          =   2940
  210.       Highlight       =   -1  'True
  211.       HighlightColor  =   &H00008000&
  212.       KnobColor       =   &H00C00000&
  213.       KnobOriginX     =   0.3
  214.       KnobOriginY     =   0
  215.       KnobRadius      =   0.3
  216.       KnobStyle       =   1  ' 1 - Pointer
  217.       KnobUserDefined =   ""
  218.       Left            =   150
  219.       LineDisplay     =   -1  'True
  220.       LineInnerRadius =   0.35
  221.       LineThickness   =   2
  222.       MarkUserDefined =   ""
  223.       MouseControl    =   -1  'True
  224.       OutlineAlign    =   0  ' 0 - Left 
  225.       OutlineColor    =   &H00000000&
  226.       OutlineTitle    =   ""
  227.       OutlineWidth    =   0
  228.       Radius          =   0
  229.       TabIndex        =   22
  230.       TabStop         =   0   'False
  231.       Top             =   150
  232.       Value           =   4
  233.       Width           =   2910
  234.       XScale          =   0
  235.       YScale          =   0
  236.       ZLoad           =   SECAPTIO.FRX:0000
  237.    End
  238.    Begin Label Label2 
  239.       AutoSize        =   -1  'True
  240.       BackStyle       =   0  'Transparent
  241.       Caption         =   " "
  242.       Height          =   195
  243.       Index           =   1
  244.       Left            =   7080
  245.       TabIndex        =   21
  246.       Top             =   1890
  247.       Width           =   330
  248.    End
  249.    Begin Label Label1 
  250.       Alignment       =   1  'Right Justify
  251.       AutoSize        =   -1  'True
  252.       BackStyle       =   0  'Transparent
  253.       Caption         =   "CaptionY:"
  254.       FontBold        =   0   'False
  255.       FontItalic      =   0   'False
  256.       FontName        =   "MS Sans Serif"
  257.       FontSize        =   8.25
  258.       FontStrikethru  =   0   'False
  259.       FontUnderline   =   0   'False
  260.       Height          =   195
  261.       Index           =   1
  262.       Left            =   3480
  263.       TabIndex        =   24
  264.       Top             =   1890
  265.       Width           =   690
  266.    End
  267.    Begin Label Label1 
  268.       Alignment       =   1  'Right Justify
  269.       AutoSize        =   -1  'True
  270.       BackStyle       =   0  'Transparent
  271.       Caption         =   "Caption :"
  272.       FontBold        =   0   'False
  273.       FontItalic      =   0   'False
  274.       FontName        =   "MS Sans Serif"
  275.       FontSize        =   8.25
  276.       FontStrikethru  =   0   'False
  277.       FontUnderline   =   0   'False
  278.       Height          =   195
  279.       Index           =   2
  280.       Left            =   3540
  281.       TabIndex        =   13
  282.       Top             =   2550
  283.       Width           =   630
  284.    End
  285.    Begin Label Label2 
  286.       Alignment       =   2  'Center
  287.       AutoSize        =   -1  'True
  288.       BackStyle       =   0  'Transparent
  289.       Caption         =   " "
  290.       Height          =   195
  291.       Index           =   2
  292.       Left            =   5325
  293.       TabIndex        =   12
  294.       Top             =   2730
  295.       Width           =   90
  296.    End
  297.    Begin Label Label1 
  298.       Alignment       =   1  'Right Justify
  299.       AutoSize        =   -1  'True
  300.       BackStyle       =   0  'Transparent
  301.       Caption         =   "CaptionX:"
  302.       FontBold        =   0   'False
  303.       FontItalic      =   0   'False
  304.       FontName        =   "MS Sans Serif"
  305.       FontSize        =   8.25
  306.       FontStrikethru  =   0   'False
  307.       FontUnderline   =   0   'False
  308.       Height          =   195
  309.       Index           =   0
  310.       Left            =   3480
  311.       TabIndex        =   6
  312.       Top             =   1620
  313.       Width           =   690
  314.    End
  315.    Begin Label Label2 
  316.       AutoSize        =   -1  'True
  317.       BackStyle       =   0  'Transparent
  318.       Caption         =   " "
  319.       Height          =   195
  320.       Index           =   0
  321.       Left            =   7080
  322.       TabIndex        =   7
  323.       Top             =   1620
  324.       Width           =   330
  325.    End
  326. End
  327.  
  328. Sub Colors_Click (index As Integer)
  329.  
  330.     Selector1.CaptionColor = colors(index).BackColor
  331.  
  332. End Sub
  333.  
  334. Sub Form_Load ()
  335.  
  336.     hscroll1(0) = Selector1.CaptionX * 100
  337.     hscroll1(1) = Selector1.CaptionY * 100
  338.  
  339.     label2(0) = Selector1.CaptionX
  340.     label2(1) = Selector1.CaptionY
  341.  
  342.     text1 = Selector1.Caption
  343.  
  344. End Sub
  345.  
  346. Sub HScroll1_Change (index As Integer)
  347.  
  348.     Select Case index
  349.         Case 0
  350.             Selector1.CaptionX = hscroll1(0) / 100
  351.             label2(0) = hscroll1(0) / 100
  352.         Case 1
  353.             Selector1.CaptionY = hscroll1(1) / 100
  354.             label2(1) = hscroll1(1) / 100
  355.     End Select
  356.  
  357. End Sub
  358.  
  359. Sub HScroll1_Scroll (index As Integer)
  360.  
  361.     Select Case index
  362.         Case 0
  363.             Selector1.CaptionX = hscroll1(0) / 100
  364.             label2(0) = hscroll1(0) / 100
  365.         Case 1
  366.             Selector1.CaptionY = hscroll1(1) / 100
  367.             label2(1) = hscroll1(1) / 100
  368.     End Select
  369.  
  370. End Sub
  371.  
  372. Sub Option1_Click (index As Integer)
  373.  
  374.     Selector1.CaptionID = index
  375.     hscroll1(0) = Selector1.CaptionX * 100
  376.     hscroll1(1) = Selector1.CaptionY * 100
  377.     text1 = Selector1.Caption
  378.  
  379. End Sub
  380.  
  381. Sub Text1_Change ()
  382.  
  383.     Selector1.Caption = text1
  384.  
  385. End Sub
  386.  
  387.